package com.ling.pl.autoproject.definition.view.model;

import com.ling.pl.core.commons.annotation.Dict;
import com.ling.pl.core.commons.annotation.ModelProperty;

import javax.persistence.Column;

/**
 * 实体视图
 */
public class View {
    @Column(name = "ENTITY_ID", length = 36)
    @ModelProperty(comment = "实体id")
    String entityId;

    @Column(name = "NAME", length = 150)
    @ModelProperty(comment = "名称")
    String name;

    @Column(name = "CODE", length = 150)
    @ModelProperty(comment = "代码")
    String code;

    @Column(name = "VIEWSTYLE_ID", length = 36)
    @ModelProperty(comment = "实体id")
    String viewStyleId;

    @Column(name = "ICON", length = 150)
    @ModelProperty(comment = "图标")
    String icon;

    @Column(name = "TITLE", length = 150)
    @ModelProperty(comment = "标题语言资源")
    String title;

    @Column(name = "TITLE_I18N", length = 150)
    @ModelProperty(comment = "标题语言资源")
    String titleI18n;

    @Column(name = "IS_TITLE")
    @ModelProperty(comment = "显示标题栏")
    Boolean isTitle;

    @Column(name = "VIEW_TYPE", length = 150)
    @ModelProperty(comment = "预置视图类型")
    @Dict(code = "builder.view.viewType", des = "默认单选视图\n" +
            "默认编辑视图\n" +
            "默认索引实体选择视图\n" +
            "默认多表单选择视图\n" +
            "默认多选视图\n" +
            "默认多项视图\n" +
            "默认流程编辑视图\n" +
            "默认流程多项视图\n" +
            "默认数据重定向视图\n" +
            "移动端默认单选视图\n" +
            "移动端默认编辑视图\n" +
            "移动端默认索引实体选择视图\n" +
            "移动端默认多表单选择视图\n" +
            "移动端默认多选视图\n" +
            "移动端默认多项视图\n" +
            "移动端默认流程编辑视图\n" +
            "移动端默认流程多项视图")
    String viewType;

    @Column(name = "SECURITY_TYPE", length = 150)
    @ModelProperty(comment = "访问用户模式")
    @Dict(code = "builder.view.securityType", des = "匿名用户,登录用户,匿名用户及登录用户,登录用户组且拥有指定资源能力")
    String securityType;

    @Column(name = "ROLE", length = 150)
    @ModelProperty(comment = "系统统一资源")
    String role;

    @Column(name = "PARAMS", length = 250)
    @ModelProperty(comment = "视图参数")
    String params;

    //系统开发
    @Column(name = "REQUIREMENT_ID", length = 36)
    @ModelProperty(comment = "需求id")
    String requirementId;

    @Column(name = "TODO", length = 500)
    @ModelProperty(comment = "todo")
    String todo;
}
